package com.ruoyi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.domain.VmsVehicleInfo;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 商品品牌Mapper接口
 *
 * @author chongjin
 * @date 2020-12-17
 */
public interface VmsVehicleInfoMapper extends BaseMapper<VmsVehicleInfo> {

    /**
     * 查询房间生效合同
     *
     * @return
     */
    @Select("select room_id,max(contract_id) contract_id from rent_contract_info where begin_date<now() and end_date>now() group by room_id")
    List<VmsVehicleInfo> queryEffectRoomContractRef();
}
